from django.conf.urls import *

from apps.reader import views

urlpatterns = [
    url(r"^$", views.index),
    url(r"^buster", views.iframe_buster, name="iframe-buster"),
    url(r"^login_as", views.login_as, name="login_as"),
    url(r"^welcome", views.welcome_req, name="welcome"),
    url(r"^logout", views.logout, name="welcome-logout"),
    url(r"^login", views.login, name="welcome-login"),
    url(r"^autologin/(?P<username>\w+)/(?P<secret>\w+)/?", views.autologin, name="autologin"),
    url(r"^signup", views.signup, name="welcome-signup"),
    url(r"^feeds/?$", views.load_feeds, name="load-feeds"),
    url(r"^feed/(?P<feed_id>\d+)", views.load_single_feed, name="load-single-feed"),
    url(r"^page/(?P<feed_id>\d+)", views.load_feed_page, name="load-feed-page"),
    url(r"^refresh_feed/(?P<feed_id>\d+)", views.refresh_feed, name="refresh-feed"),
    url(r"^favicons", views.load_feed_favicons, name="load-feed-favicons"),
    url(r"^river_stories_widget", views.load_river_stories_widget, name="load-river-stories-widget"),
    url(r"^river_stories", views.load_river_stories__redis, name="load-river-stories"),
    url(r"^complete_river", views.complete_river, name="complete-river"),
    url(r"^refresh_feeds", views.refresh_feeds, name="refresh-feeds"),
    url(r"^interactions_count", views.interactions_count, name="interactions-count"),
    url(r"^feed_unread_count", views.feed_unread_count, name="feed-unread-count"),
    url(r"^starred_stories", views.load_starred_stories, name="load-starred-stories"),
    url(r"^read_stories", views.load_read_stories, name="load-read-stories"),
    url(r"^starred_story_hashes", views.starred_story_hashes, name="starred-story-hashes"),
    url(
        r"^starred_rss/(?P<user_id>\d+)/(?P<secret_token>\w+)/?$",
        views.starred_stories_rss_feed,
        name="starred-stories-rss-feed",
    ),
    url(
        r"^starred_rss/(?P<user_id>\d+)/(?P<secret_token>\w+)/(?P<tag_slug>[-\w]+)?/?$",
        views.starred_stories_rss_feed_tag,
        name="starred-stories-rss-feed-tag",
    ),
    url(
        r"^folder_rss/(?P<user_id>\d+)/(?P<secret_token>\w+)/(?P<unread_filter>\w+)/(?P<folder_slug>[-\w]+)?/?$",
        views.folder_rss_feed,
        name="folder-rss-feed",
    ),
    url(r"^unread_story_hashes", views.unread_story_hashes, name="unread-story-hashes"),
    url(r"^starred_counts", views.starred_counts, name="starred-counts"),
    url(r"^mark_all_as_read", views.mark_all_as_read, name="mark-all-as-read"),
    url(r"^mark_story_as_read", views.mark_story_as_read, name="mark-story-as-read"),
    url(r"^mark_story_hashes_as_read", views.mark_story_hashes_as_read, name="mark-story-hashes-as-read"),
    url(r"^mark_feed_stories_as_read", views.mark_feed_stories_as_read, name="mark-feed-stories-as-read"),
    url(
        r"^mark_social_stories_as_read", views.mark_social_stories_as_read, name="mark-social-stories-as-read"
    ),
    url(r"^mark_story_as_unread", views.mark_story_as_unread),
    url(r"^mark_story_hash_as_unread", views.mark_story_hash_as_unread, name="mark-story-hash-as-unread"),
    url(r"^mark_story_as_starred", views.mark_story_as_starred),
    url(r"^mark_story_hash_as_starred", views.mark_story_hash_as_starred),
    url(r"^mark_story_as_unstarred", views.mark_story_as_unstarred),
    url(r"^mark_story_hash_as_unstarred", views.mark_story_hash_as_unstarred),
    url(r"^mark_feed_as_read", views.mark_feed_as_read),
    url(r"^delete_feed_by_url", views.delete_feed_by_url, name="delete-feed-by-url"),
    url(r"^delete_feeds_by_folder", views.delete_feeds_by_folder, name="delete-feeds-by-folder"),
    url(r"^delete_feed", views.delete_feed, name="delete-feed"),
    url(r"^delete_folder", views.delete_folder, name="delete-folder"),
    url(r"^rename_feed", views.rename_feed, name="rename-feed"),
    url(r"^rename_folder", views.rename_folder, name="rename-folder"),
    url(r"^move_feed_to_folders", views.move_feed_to_folders, name="move-feed-to-folders"),
    url(r"^move_feed_to_folder", views.move_feed_to_folder, name="move-feed-to-folder"),
    url(r"^move_folder_to_folder", views.move_folder_to_folder, name="move-folder-to-folder"),
    url(
        r"^move_feeds_by_folder_to_folder",
        views.move_feeds_by_folder_to_folder,
        name="move-feeds-by-folder-to-folder",
    ),
    url(r"^add_url", views.add_url),
    url(r"^add_folder", views.add_folder),
    url(r"^add_feature", views.add_feature, name="add-feature"),
    url(r"^features", views.load_features, name="load-features"),
    url(r"^save_feed_order", views.save_feed_order, name="save-feed-order"),
    url(r"^feeds_trainer", views.feeds_trainer, name="feeds-trainer"),
    url(r"^save_feed_chooser", views.save_feed_chooser, name="save-feed-chooser"),
    url(r"^send_story_email", views.send_story_email, name="send-story-email"),
    url(r"^retrain_all_sites", views.retrain_all_sites, name="retrain-all-sites"),
    url(r"^load_tutorial", views.load_tutorial, name="load-tutorial"),
    url(r"^save_search", views.save_search, name="save-search"),
    url(r"^delete_search", views.delete_search, name="delete-search"),
    url(r"^save_dashboard_rivers", views.save_dashboard_rivers, name="save-dashboard-rivers"),
    url(r"^save_dashboard_river", views.save_dashboard_river, name="save-dashboard-river"),
    url(r"^remove_dashboard_river", views.remove_dashboard_river, name="remove-dashboard-river"),
    url(r"^print", views.print_story, name="print-story"),
]
